<template>
  <div>
    <el-dialog title="单个导入" :visible.sync="singleVisible" width="80%" :show-close="false" :close-on-click-modal="false">
      <el-card :body-style="{ background: '#eff3f6' }">
        <div slot="header" class="clearfix">
          <span style="color:#4e9efd;font-size:17px;">样品基本参数</span>
        </div>
        <el-form v-if="importDataType == '软磁'" :model="qssmdForm" :rules="qssmdRules" ref="qssmdForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qssmdForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qssmdForm.specification" style="width:195px;" autocomplete="off" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qssmdForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qssmdForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qssmdForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):" prop="nominalDensity">
                <el-input v-model="qssmdForm.nominalDensity" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="单片厚度/mm:" prop="thickness">
                <el-input v-model="qssmdForm.thickness" placeholder="输入范围: 大于0"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称叠压系数:" prop="overlapCoefficient">
                <el-input v-model="qssmdForm.overlapCoefficient" placeholder="输入范围：0 - 1"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="饱和磁密/T:" prop="fluxDensity">
                <el-input v-model="qssmdForm.fluxDensity" placeholder="输入范围：0 - 2.5"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="饱和磁致伸缩系数/ppm:" prop="magCoefficient">
                <el-input v-model="qssmdForm.magCoefficient" placeholder="输入范围：-2000 - 2000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="电导率/(S/m):" prop="electricalConductivity">
                <el-input v-model="qssmdForm.electricalConductivity" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="热导率/(W/m-k):" prop="heatConductivity">
                <el-input v-model="qssmdForm.heatConductivity" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="屈服强度/MPa:" prop="yieldStrength">
                <el-input v-model="qssmdForm.yieldStrength" placeholder="输入范围：0 - 1700"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="居里温度/Cel.Deg:" prop="curieTemperature">
                <el-input v-model="qssmdForm.curieTemperature" placeholder="输入范围：0 - 900"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qssmdForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qssmdForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qssmdForm.projuctGroup"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qssmdForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qssmdForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
        </el-form>
        <el-form v-if="importDataType == '永磁'" :model="qspmdForm" :rules="qspmdRules" ref="qspmdForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qspmdForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qspmdForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qspmdForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qspmdForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):">
                <el-input v-model="qspmdForm.nominalDensity" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="材料类型:">
                <el-input v-model="qspmdForm.materialsType"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产工艺:">
                <el-input v-model="qspmdForm.manufacturingTechnique"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qspmdForm.specification" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="剩磁Br/T:" prop="remanence">
                <el-input v-model="qspmdForm.remanence" placeholder="输入范围：0 - 2.5"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="矫顽力Hcb/(kA/m):" prop="coercivity">
                <el-input v-model="qspmdForm.coercivity" placeholder="输入范围：0 - 5000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="内禀矫顽力Hcj/(kA/m):" prop="intrinsicCoercivity">
                <el-input v-model="qspmdForm.intrinsicCoercivity" placeholder="输入范围：0 - 5000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="最大磁能积/(kJ/m^3):">
                <el-input v-model="qspmdForm.maximumMagnetic"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="电导率/(S/m):" prop="specificConductance">
                <el-input v-model="qspmdForm.specificConductance" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="回复磁导率:" prop="recoilPermeability">
                <el-input v-model="qspmdForm.recoilPermeability" placeholder="输入范围：0 - 1000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="热导率/(W/m.K):" prop="heatConductivity">
                <el-input v-model="qspmdForm.heatConductivity" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="杨氏模量/GPa:" prop="youngModulus">
                <el-input v-model="qspmdForm.youngModulus" placeholder="输入范围：0 - 20"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="韦氏硬度:" prop="hw">
                <el-input v-model="qspmdForm.hw" placeholder="输入范围：0 - 10(整数)"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="Br可逆温度系数/(%/^。C):" prop="brReversibleTemperature">
                <el-input v-model="qspmdForm.brReversibleTemperature" placeholder="输入范围：-0 - -1"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="Hcj可逆温度系数/(%/^。C):" prop="hcjReversibleTemperature">
                <el-input v-model="qspmdForm.hcjReversibleTemperature" placeholder="输入范围：-0 - -1"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="居里温度/^。C:" prop="curiePoint">
                <el-input v-model="qspmdForm.curiePoint" placeholder="输入范围：0 - 900"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="最高工作温度/^。C:" prop="maximumTemperature">
                <el-input v-model="qspmdForm.maximumTemperature" placeholder="输入范围：0 - 900"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qssmdForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qspmdForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qspmdForm.projuctGroup"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qspmdForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qspmdForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
        </el-form>
        <el-form v-if="importDataType == '导电'" :model="qsemdForm" :rules="qsemdRules" ref="qsemdForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qsemdForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qsemdForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qsemdForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qsemdForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):" prop="nominalDensity">
                <el-input v-model="qsemdForm.nominalDensity" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qsemdForm.specification" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="电导率/(S/m):" prop="specificConductance">
                <el-input v-model="qsemdForm.specificConductance" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="热导率/(W/m.K):" prop="heatConductivity">
                <el-input v-model="qsemdForm.heatConductivity" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="屈服强度/MPa:" prop="yieldStrength">
                <el-input v-model="qsemdForm.yieldStrength" placeholder="输入范围：0 - 1700"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qssmdForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qsemdForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qsemdForm.projuctGroup"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qsemdForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qsemdForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
        </el-form>
        <el-form v-if="importDataType == '绝缘'" :model="qsjyForm" :rules="qsemdRules" ref="qsjyForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qsjyForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qsjyForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qsjyForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qsjyForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="密度/(kg/m³):" prop="density">
                <el-input v-model="qsjyForm.density" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qsjyForm.specification" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="绝缘电阻/Ω:" prop="insulationResistance">
                <el-input v-model="qsjyForm.insulationResistance" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="体积电阻/Ω:" prop="volumeResistance">
                <el-input v-model="qsjyForm.volumeResistance" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="介电常数:" prop="dielectricConstant">
                <el-input v-model="qsjyForm.dielectricConstant" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="介质损耗因数:" prop="dielectricDissipationFactor">
                <el-select v-model="qsjyForm.dielectricDissipationFactor" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="击穿电压/V:" prop="breakdownVoltage">
                <el-input v-model="qsjyForm.breakdownVoltage" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="耐受电压/V:" prop="withstandVoltage">
                <el-input v-model="qsjyForm.withstandVoltage" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="电气强度/(V/mm):" prop="electricStrength">
                <el-input v-model="qsjyForm.electricStrength" placeholder="输入范围：0 - 1700"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="局部放电起始电压/V:" prop="partialDischargeInceptionVoltage">
                <el-input v-model="qsjyForm.partialDischargeInceptionVoltage" placeholder="输入范围：0 - 1700"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="局部放电熄灭电压/V:" prop="partialDischargeExtinctionVoltage">
                <el-input v-model="qsjyForm.partialDischargeExtinctionVoltage"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="导热系数/(W/(m*K)):" prop="thermalConductivity">
                <el-input v-model="qsjyForm.thermalConductivity"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="玻璃化转变温度/℃:" prop="glassTransitionTemperature">
                <el-input v-model="qsjyForm.glassTransitionTemperature" placeholder="输入范围：0 - 1700"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qsjyForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qsjyForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qsjyForm.projectGroup"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qsjyForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qsjyForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
        </el-form>
        <el-form v-if="importDataType == '传热'" :model="qsjyForm" :rules="qsemdRules" ref="qscrForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qscrForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qscrForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qscrForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qscrForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):" prop="density">
                <el-input v-model="qscrForm.density" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qscrForm.specification" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="常温比热容/(J/(kg·K)):" prop="specificHeat">
                <el-input v-model="qscrForm.specificHeat" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="常温线膨胀系数/(1/K):" prop="linerCoefficientExpansion">
                <el-input v-model="qscrForm.linerCoefficientExpansion" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="常温热扩散系数/(m^2/s):" prop="thermalDiffusivity">
                <el-input v-model="qscrForm.thermalDiffusivity" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="熔点/℃:" prop="meltingPoint">
                <el-select v-model="qscrForm.meltingPoint" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
             <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qscrForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qscrForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qscrForm.projectGroup"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qscrForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qscrForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
        </el-form>
        <el-form v-if="importDataType == '机械'" :model="qsjyForm" :rules="qsemdRules" ref="qsjxForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qsjxForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qsjxForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qsjxForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qsjxForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):" prop="density">
                <el-input v-model="qsjxForm.density" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qsjxForm.specification" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="材料类型:" prop="materialType">
                <el-input v-model="qsjxForm.materialType" placeholder="输入范围：0 - 63000000"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="抗拉强度/MPa:" prop="tensileStrength">
                <el-input v-model="qsjxForm.tensileStrength" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="泊松比:" prop="poissonRatio">
                <el-input v-model="qsjxForm.poissonRatio" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="断裂延伸率:" prop="fractureElongation">
                <el-select v-model="qsjxForm.fractureElongation" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="硬度:" prop="hardness">
                <el-select v-model="qsjxForm.hardness" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
             <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qsjxForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qscrForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qscrForm.projectGroup"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qscrForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qscrForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
        </el-form>
        <el-form v-if="importDataType == '超导'" :model="qsjyForm" :rules="qsemdRules" ref="qscdForm" label-position="left" :inline="true">
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="牌号:">
                <el-input v-model="qscdForm.grade"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="国别:">
                <el-input v-model="qscdForm.country"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产商:">
                <el-select v-model="qscdForm.manufacturer" style="width:195px;" filterable clearable>
                  <el-option v-for="item in producerOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="数据类型:">
                <el-select v-model="qscdForm.dataType" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="执行标准:">
                <el-select v-model="qscdForm.standard" style="width:195px;" filterable clearable>
                  <el-option v-for="item in implementOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称密度/(kg/m³):" prop="density">
                <el-input v-model="qscdForm.density" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品规格:" prop="specification">
                <el-select v-model="qscdForm.nominalDensity" style="width:195px;" clearable>
                  <el-option v-for="item in specificationOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                </el-select>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="生产工艺:" prop="current">
                <el-input v-model="qscdForm.productionProcess" placeholder="输入范围：0 - 2400"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="长度:" prop="length">
                <el-input v-model="qscdForm.length" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="宽度:" prop="width">
                <el-input v-model="qscdForm.width" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="厚度:" prop="thickness">
                <el-input v-model="qscdForm.thickness" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="标称临界电流/A:" prop="nominalCriticalCurrent">
                <el-input v-model="qscdForm.nominalCriticalCurrent" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="热导率/(W/m-k):" prop="heatConductivity">
                <el-input v-model="qscdForm.heatConductivity" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="屈服强度/MPa:" prop="yieldStrength">
                <el-input v-model="qscdForm.yieldStrength" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="临界温度/Cel.Deg.:" prop="criticalTemperature">
                <el-input v-model="qscdForm.criticalTemperature" placeholder="输入范围：0 - 22590"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="入库日期:">
                <el-date-picker v-model="qscdForm.inDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width:190px;"> </el-date-picker>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
          <a-row :gutter="20" style="margin-bottom: 5px">
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品柜编号:">
                <el-input v-model="qscdForm.cabinetNumber"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="项目组:">
                <el-input v-model="qscdForm.projectGroup"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="样品提供人:">
                <el-input v-model="qscdForm.sampleProducer"></el-input>
              </el-form-item>
            </a-col>
            <a-col :sm="24" :md="12" :xl="6">
              <el-form-item label-width="190px" label="备注:">
                <el-input v-model="qscdForm.remarks"></el-input>
              </el-form-item>
            </a-col>
          </a-row>
          <el-divider></el-divider>
        </el-form>
      </el-card>
      <el-card style="margin-top: 10px">
        <div slot="header" class="clearfix">
          <span style="color:#4e9efd;font-size:17px;">曲线类型</span>
        </div>
        <el-card v-for="index of cardLength.length" :key="index" :body-style="{ background: '#eff3f6' }" style="margin-bottom: 10px">
          <el-row :gutter="20" style="margin-top: 10px">
            <el-col :span="6">
              <el-cascader v-if="importDataType == '软磁'" v-model="curveAndDisplay[index - 1]" :options="ruanciCurveOptions" size="mini" @change="judge1(index - 1)" placeholder="请选择曲线类型"></el-cascader>
              <el-cascader v-if="importDataType == '永磁'" v-model="curveAndDisplay[index - 1]" :options="yongciCurveOptions" size="mini" @change="judge1(index - 1)" placeholder="请选择曲线类型"></el-cascader>
              <el-cascader v-if="importDataType == '导电'" v-model="curveAndDisplay[index - 1]" :options="daodianCurveOptions" size="mini" @change="judge1(index - 1)" placeholder="请选择曲线类型"></el-cascader>
            </el-col>
            <el-col :span="2">
              <el-button @click="addCondition" type="primary" size="mini"><i class="el-icon-plus"></i></el-button>
            </el-col>
            <el-col :span="2">
              <el-button @click="delCondition(index)" size="mini"><i class="el-icon-minus"></i></el-button>
            </el-col>
          </el-row>

          <el-form :model="curveParams[index - 1]" label-position="left" :inline="true" style="margin-top: 30px">
            <a-row :gutter="20">
              <a-col :sm="24" :md="12" :xl="6" v-for="item in headerTitle[index - 1]" :key="item.label" style="padding:0;">
                <el-form-item v-if="item.label == '测量标准'" label-width="170px" :label="item.label + ':'" style="margin-top:20px">
                  <el-select v-model="curveParams[index - 1][item.prop]" style="width:190px;" filterable clearable>
                    <el-option v-for="item in standardOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item v-else-if="item.label == '消除应力退火'" label-width="170px" :label="item.label + ':'" style="margin-top:20px">
                  <el-select v-model="curveParams[index - 1][item.prop]" style="width:190px;" clearable>
                    <el-option v-for="item in stressReliefAnnealingOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item v-else-if="item.label == '有无护套'" label-width="170px" :label="item.label + ':'" style="margin-top:20px">
                  <el-select v-model="curveParams[index - 1][item.prop]" style="width:190px;" clearable>
                    <el-option v-for="item in sheathOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item v-else label-width="170px" :label="item.label + ':'" style="margin-top:20px">
                  <el-input v-model="curveParams[index - 1][item.prop]"></el-input>
                </el-form-item>
                <a-divider style="height: 2px;margin:0;" />
              </a-col>
            </a-row>
          </el-form>
          <el-row :gutter="20" style="margin-top: 20px">
            <el-col :span="2">
              <el-button size="mini" @click="exportData(index - 1)" type="primary">下载模板</el-button>
            </el-col>
            <el-col :span="2">
              <el-upload action="http://59.172.104.174:30669/user/parseData" :data="parseData[index - 1]" :file-list="fileList" :on-success="getParseData">
                <el-button size="mini" @click="getUploadNum(index - 1)" type="primary">Excel导入</el-button>
              </el-upload>
            </el-col>
          </el-row>
        </el-card>
      </el-card>

      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" style="margin-right: 20px" @click="isConfirm()">导入</el-button>
        <el-button type="danger" size="small" style="margin-right: 20px" @click="closeImport()">关闭</el-button>
      </span>
    </el-dialog>

    <getHeaderDyna :hidden="true" :importDataType="importDataType + '性能'" ref="getHeaderDyna" @getHeader="getHeader"></getHeaderDyna>
  </div>
</template>

<script>
import { Message } from 'element-ui'
import getHeaderDyna from './nextComponents/getHeaderDyna.vue'
export default {
  props: {
    importDataType: '' //判断是软磁、永磁、导电
  },
  components: {
    getHeaderDyna
  },
  data() {
    // 软磁的正则校验
    var checkNominalDensity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 22590的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 22590的数 '))
          } else if (value > 22590) {
            callback(new Error('请输入范围在0 - 22590的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkThickness = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入大于0的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入大于0的数'))
          } else if (value > 22590) {
            callback(new Error('请输入大于0的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkOverlapCoefficient = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 1的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 1的数'))
          } else if (value > 1) {
            callback(new Error('请输入范围在0 - 1的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkFluxDensity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 2.5的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 2.5的数'))
          } else if (value > 2.5) {
            callback(new Error('请输入范围在0 - 2.5的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkMagCoefficient = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          callback(new Error('请输入范围在-2000 - 2000的数'))
        } else {
          if (value < -2000) {
            callback(new Error('请输入范围在-2000 - 2000的数'))
          } else if (value > 2000) {
            callback(new Error('请输入范围在-2000 - 2000的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkElectricalConductivity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 63000000的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 63000000的数 '))
          } else if (value > 63000000) {
            callback(new Error('请输入范围在0 - 63000000的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkHeatConductivity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 2400的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 2400的数 '))
          } else if (value > 2400) {
            callback(new Error('请输入范围在0 - 2400的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkYieldStrength = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 1700的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 1700的数 '))
          } else if (value > 1700) {
            callback(new Error('请输入范围在0 - 1700的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkCurieTemperature = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 900的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else if (value > 900) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    // 永磁的正则校验
    var checkRemanence = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 2.5的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 2.5的数 '))
          } else if (value > 2.5) {
            callback(new Error('请输入范围在0 - 2.5的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkCoercivity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 5000的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 5000的数 '))
          } else if (value > 5000) {
            callback(new Error('请输入范围在0 - 5000的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkIntrinsicCoercivity = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 5000的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 5000的数 '))
          } else if (value > 5000) {
            callback(new Error('请输入范围在0 - 5000的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkSpecificConductance = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 630000000的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 630000000的数 '))
          } else if (value > 630000000) {
            callback(new Error('请输入范围在0 - 630000000的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkRecoilPermeability = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 1000的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 1000的数 '))
          } else if (value > 1000) {
            callback(new Error('请输入范围在0 - 1000的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkYoungModulus = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 20的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 20的数 '))
          } else if (value > 20) {
            callback(new Error('请输入范围在0 - 20的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkHw = (rule, value, callback) => {
      //非负整数 正则
      var reg = /^\d+$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 10的整数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 10的整数'))
          } else if (value > 10) {
            callback(new Error('请输入范围在0 - 10的整数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkBrReversibleTemperature = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在-1 - -0的数'))
        } else {
          if (value < -1) {
            callback(new Error('请输入范围在-1 - -0的数'))
          } else if (value > 0) {
            callback(new Error('请输入范围在-1 - -0的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkHcjReversibleTemperature = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在-1 - -0的数'))
        } else {
          if (value < -1) {
            callback(new Error('请输入范围在-1 - -0的数'))
          } else if (value > 0) {
            callback(new Error('请输入范围在-1 - -0的数'))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkCuriePoint = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 900的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else if (value > 900) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    var checkMaximumTemperature = (rule, value, callback) => {
      //浮点数 正则
      var reg = /^(-?\d+)(\.\d+)?$/
      if (!value) {
        //当没有值的时候，直接callback，让他不校验直接执行下一步
        return callback()
      }
      setTimeout(() => {
        if (!reg.test(value)) {
          console.log('value', value)
          callback(new Error('请输入范围在0 - 900的数'))
        } else {
          if (value < 0) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else if (value > 900) {
            callback(new Error('请输入范围在0 - 900的数 '))
          } else {
            return callback()
          }
        }
      }, 100)
    }
    return {
      currentNum: '',
      uploadNum: '',
      singleVisible: false,
      fileList: [],
      parseData: [],
      parseDataResponse: [],
      /**************样品基本参数*************** */
      columnTitle: [],
      qssmdForm: {
        grade: '',
        specification: '',
        country: '',
        manufacturer: '',
        standard: '',
        nominalDensity: '',
        thickness: '',
        overlapCoefficient: '',
        fluxDensity: '',
        magCoefficient: '',
        electricalConductivity: '',
        heatConductivity: '',
        yieldStrength: '',
        curieTemperature: '',
        inDate: '',
        cabinetNumber: '',
        projuctGroup: '',
        sampleProducer: '',
        remarks: ''
      },
      qspmdForm: {
        grade: '',
        country: '',
        manufacturer: '',
        standard: '',
        nominalDensity: '',
        materialsType: '',
        manufacturingTechnique: '',
        specification: '',
        remanence: '',
        coercivity: '',
        intrinsicCoercivity: '',
        maximumMagnetic: '',
        specificConductance: '',
        recoilPermeability: '',
        heatConductivity: '',
        youngModulus: '',
        hw: '',
        brReversibleTemperature: '',
        hcjReversibleTemperature: '',
        curiePoint: '',
        maximumTemperature: '',
        inDate: '',
        cabinetNumber: '',
        projuctGroup: '',
        sampleProducer: '',
        remarks: ''
      },
      qsemdForm: {
        grade: '',
        country: '',
        manufacturer: '',
        standard: '',
        nominalDensity: '',
        specification: '',
        specificConductance: '',
        heatConductivity: '',
        yieldStrength: '',
        inDate: '',
        cabinetNumber: '',
        projuctGroup: '',
        sampleProducer: '',
        remarks: ''
      },
      qsjyForm: {
        parameterId: '',
        grade: '',
        specification: '',
        country: '',
        manufacturer: '',
        standard: '',
        density: '',
        insulationResistance: '',
        volumeResistance: '',
        dielectricConstant: '',
        dielectricDissipationFactor: '',
        breakdownVoltage: '',
        withstandVoltage: '',
        electricStrength: '',
        partialDischargeInceptionVoltage: '',
        partialDischargeExtinctionVoltage: '',
        thermalConductivity: '',
        glassTransitionTemperature: '',
        inDate: '',
        cabinetNumber: '',
        projectGroup: '',
        sampleProducer: '',
        remarks: '',
      },
      /**************样品基本参数*************** */

      /**************曲线类型*************** */
      curveAndDisplay: [''],
      // display: [''],
      cardLength: [''],
      headerTitle: [],
      curveParams: [],
      // 曲线类型
      ruanciCurveOptions: [
        {
          label: '静态',
          value: '静态',
          children: [
            {
              label: '原始波形',
              value: '原始波形'
            },
            {
              label: '磁化曲线',
              value: '磁化曲线'
            },
            {
              label: '磁滞回线',
              value: '磁滞回线'
            },
            {
              label: '铁损曲线',
              value: '铁损曲线'
            }
          ]
        },
        {
          label: '动态',
          value: '动态',
          children: [
            {
              label: '原始波形',
              value: '原始波形'
            },
            {
              label: '磁化曲线',
              value: '磁化曲线'
            },
            {
              label: '磁滞回线',
              value: '磁滞回线'
            },
            {
              label: '铁损曲线',
              value: '铁损曲线'
            }
          ]
        }
      ],
      yongciCurveOptions: [
        {
          label: '静态',
          value: '静态',
          children: [
            {
              label: '原始波形',
              value: '原始波形'
            },
            {
              label: '磁滞回线',
              value: '磁滞回线'
            },
            {
              label: '退磁曲线',
              value: '退磁曲线'
            }
          ]
        }
      ],
      daodianCurveOptions: [
        {
          label: '静态',
          value: '静态',
          children: [
            {
              label: '伏安曲线',
              value: '伏安曲线'
            },
            {
              label: '电阻曲线',
              value: '电阻曲线'
            },
            {
              label: '电阻率曲线',
              value: '电阻率曲线'
            },
            {
              label: '电导率曲线',
              value: '电导率曲线'
            }
          ]
        }
      ],
      /**************曲线类型*************** */
      qssmdRules: {
        specification: [{ required: true, message: '请输入样品规格', trigger: 'blur' }],
        nominalDensity: [{ validator: checkNominalDensity, trigger: 'blur' }],
        thickness: [{ validator: checkThickness, trigger: 'blur' }],
        overlapCoefficient: [{ validator: checkOverlapCoefficient, trigger: 'blur' }],
        fluxDensity: [{ validator: checkFluxDensity, trigger: 'blur' }],
        magCoefficient: [{ validator: checkMagCoefficient, trigger: 'blur' }],
        electricalConductivity: [{ validator: checkElectricalConductivity, trigger: 'blur' }],
        heatConductivity: [{ validator: checkHeatConductivity, trigger: 'blur' }],
        yieldStrength: [{ validator: checkYieldStrength, trigger: 'blur' }],
        curieTemperature: [{ validator: checkCurieTemperature, trigger: 'blur' }]
      },
      qspmdRules: {
        specification: [{ required: true, message: '请输入样品规格', trigger: 'blur' }],
        nominalDensity: [{ validator: checkNominalDensity, trigger: 'blur' }],
        remanence: [{ validator: checkRemanence, trigger: 'blur' }],
        coercivity: [{ validator: checkCoercivity, trigger: 'blur' }],
        intrinsicCoercivity: [{ validator: checkIntrinsicCoercivity, trigger: 'blur' }],
        specificConductance: [{ validator: checkSpecificConductance, trigger: 'blur' }],
        recoilPermeability: [{ validator: checkRecoilPermeability, trigger: 'blur' }],
        heatConductivity: [{ validator: checkHeatConductivity, trigger: 'blur' }],
        youngModulus: [{ validator: checkYoungModulus, trigger: 'blur' }],
        hw: [{ validator: checkHw, trigger: 'blur' }],
        brReversibleTemperature: [{ validator: checkBrReversibleTemperature, trigger: 'blur' }],
        hcjReversibleTemperature: [{ validator: checkHcjReversibleTemperature, trigger: 'blur' }],
        curiePoint: [{ validator: checkCuriePoint, trigger: 'blur' }],
        maximumTemperature: [{ validator: checkMaximumTemperature, trigger: 'blur' }]
      },
      qsemdRules: {
        specification: [{ required: true, message: '请输入样品规格', trigger: 'blur' }],
        nominalDensity: [{ validator: checkNominalDensity, trigger: 'blur' }],
        specificConductance: [{ validator: checkSpecificConductance, trigger: 'blur' }],
        heatConductivity: [{ validator: checkHeatConductivity, trigger: 'blur' }],
        yieldStrength: [{ validator: checkYieldStrength, trigger: 'blur' }]
      },
      //测量标准
      standardOptions: [],
      //消除应力退火
      stressReliefAnnealingOptions: [
        {
          value: '是',
          label: '是'
        },
        {
          value: '否',
          label: '否'
        }
      ],
      //有无护套
      sheathOptions: [
        {
          value: '有',
          label: '有'
        },
        {
          value: '无',
          label: '无'
        }
      ],
      //生产商
      producerOptions: [],
      //执行标准
      implementOptions: [],
      //样品规格
      specificationOptions: []
    }
  },
  created() {},
  methods: {
    closeImport() {
      this.singleVisible = false
      this.resetForm()
    },
    resetForm() {
      Object.assign(this.$data, this.$options.data())
      if (this.importDataType == '软磁') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qssmdForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '永磁') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qspmdForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '导电') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qsemdForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '绝缘') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qsjyForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '传热') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qscrForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '机械') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qsjxForm'].resetFields() // 这个有校验规则的时候才需要
        })
      } else if (this.importDataType == '超导') {
        this.$nextTick(() => {
          // 看情况加
          this.$refs['qscdForm'].resetFields() // 这个有校验规则的时候才需要
        })
      }
    },
    isConfirm() {
      if (this.importDataType == '软磁') {
        this.$refs['qssmdForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              console.log('this.parseDataResponse.length', this.parseDataResponse.length)
              console.log('this.cardLength.length', this.cardLength.length)
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '永磁') {
        this.$refs['qspmdForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '导电') {
        this.$refs['qsemdForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '绝缘') {
        this.$refs['qsjyForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '传热') {
        this.$refs['qscrForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '机械') {
        this.$refs['qsjxForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      } else if (this.importDataType == '超导') {
        this.$refs['qscdForm'].validate(valid => {
          if (valid) {
            if (this.parseDataResponse.length == this.cardLength.length) {
              this.confirmImport()
            } else {
              Message({
                message: '存在曲线类型未导入Excel数据！',
                type: 'warning',
                center: true,
                customClass: 'mzindex'
              })
            }
          } else {
            return false
          }
        })
      }
    },
    confirmImport() {
      var singleformNew = {}
      if (this.importDataType == '软磁') {
        singleformNew = this.qssmdForm
        this.$set(singleformNew, 'id', '')
        this.$set(singleformNew, 'annealingProcess', '')
        this.$set(singleformNew, 'rollNumber', '')
        this.$set(singleformNew, 'normalizingProcess', '')
        this.$set(singleformNew, 'insideGrade', '')
        this.$set(singleformNew, 'state', '')
        this.$set(singleformNew, 'time', '')
        this.$set(singleformNew, 'userId', '')
        this.$set(singleformNew, 'username', '')
        this.$set(singleformNew, 'message', '')
        this.$set(singleformNew, 'duplicateChecking', '')
        this.$set(singleformNew, 'hasAttachment', '')
        this.$set(singleformNew, 'dataSource', '')
      } else if (this.importDataType == '永磁') {
        singleformNew = this.qspmdForm
        this.$set(singleformNew, 'dataType', '')
        this.$set(singleformNew, 'state', '')
        this.$set(singleformNew, 'time', '')
        this.$set(singleformNew, 'userId', '')
        this.$set(singleformNew, 'username', '')
        this.$set(singleformNew, 'message', '')
        this.$set(singleformNew, 'hasAttachment', '')
        this.$set(singleformNew, 'dataSource', '')
      } else if (this.importDataType == '导电') {
        singleformNew = this.qsemdForm
        this.$set(singleformNew, 'id', '')
        this.$set(singleformNew, 'parameterId', '')
        this.$set(singleformNew, 'time', '')
        this.$set(singleformNew, 'state', '')
        this.$set(singleformNew, 'userId', '')
        this.$set(singleformNew, 'username', '')
        this.$set(singleformNew, 'message', '')
        this.$set(singleformNew, 'duplicateChecking', '')
        this.$set(singleformNew, 'hasAttachment', '')
        this.$set(singleformNew, 'dataSource', '')
      }
      //  else if (this.importDataType == '绝缘') {
      //   singleformNew = this.qsemdForm
      //   this.$set(singleformNew, 'id', '')
      //   this.$set(singleformNew, 'parameterId', '')
      //   this.$set(singleformNew, 'time', '')
      //   this.$set(singleformNew, 'state', '')
      //   this.$set(singleformNew, 'userId', '')
      //   this.$set(singleformNew, 'username', '')
      //   this.$set(singleformNew, 'message', '')
      //   this.$set(singleformNew, 'duplicateChecking', '')
      //   this.$set(singleformNew, 'hasAttachment', '')
      //   this.$set(singleformNew, 'dataSource', '')
      // } else if (this.importDataType == '传热') {
      //   singleformNew = this.qsemdForm
      //   this.$set(singleformNew, 'id', '')
      //   this.$set(singleformNew, 'parameterId', '')
      //   this.$set(singleformNew, 'time', '')
      //   this.$set(singleformNew, 'state', '')
      //   this.$set(singleformNew, 'userId', '')
      //   this.$set(singleformNew, 'username', '')
      //   this.$set(singleformNew, 'message', '')
      //   this.$set(singleformNew, 'duplicateChecking', '')
      //   this.$set(singleformNew, 'hasAttachment', '')
      //   this.$set(singleformNew, 'dataSource', '')
      // } else if (this.importDataType == '机械') {
      //   singleformNew = this.qsemdForm
      //   this.$set(singleformNew, 'id', '')
      //   this.$set(singleformNew, 'parameterId', '')
      //   this.$set(singleformNew, 'time', '')
      //   this.$set(singleformNew, 'state', '')
      //   this.$set(singleformNew, 'userId', '')
      //   this.$set(singleformNew, 'username', '')
      //   this.$set(singleformNew, 'message', '')
      //   this.$set(singleformNew, 'duplicateChecking', '')
      //   this.$set(singleformNew, 'hasAttachment', '')
      //   this.$set(singleformNew, 'dataSource', '')
      // } else if (this.importDataType == '超导') {
      //   singleformNew = this.qsemdForm
      //   this.$set(singleformNew, 'id', '')
      //   this.$set(singleformNew, 'parameterId', '')
      //   this.$set(singleformNew, 'time', '')
      //   this.$set(singleformNew, 'state', '')
      //   this.$set(singleformNew, 'userId', '')
      //   this.$set(singleformNew, 'username', '')
      //   this.$set(singleformNew, 'message', '')
      //   this.$set(singleformNew, 'duplicateChecking', '')
      //   this.$set(singleformNew, 'hasAttachment', '')
      //   this.$set(singleformNew, 'dataSource', '')
      // }
      var measurementList = []
      for (let i = 0; i < this.curveParams.length; i++) {
        let curveParamsNew = this.curveParams[i]
        this.$set(curveParamsNew, 'id', '')
        this.$set(curveParamsNew, 'num', '')
        this.$set(curveParamsNew, 'productId', '')
        this.$set(curveParamsNew, 'time', '')
        this.$set(curveParamsNew, 'advancedPermissions', '')
        this.$set(curveParamsNew, 'grade', '')
        measurementList.push({
          type: this.importDataType + this.curveAndDisplay[i][0] + this.curveAndDisplay[i][1],
          measurement: curveParamsNew,
          dataList: this.parseDataResponse[i]
        })
      }

      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/user/importProductByUser',
        method: 'POST',
        data: {
          userId: JSON.parse(window.localStorage.getItem('pro__Login_Userinfo')).value.id,
          username: JSON.parse(window.localStorage.getItem('pro__Login_Userinfo')).value.username,
          type: this.importDataType + '样品基本参数',
          parameter: singleformNew,
          measurementList: measurementList
        }
      }).then(res => {
        if (res.data.code == 200) {
          this.singleVisible = false
          this.resetForm()
          Message({
            message: res.data.message,
            type: 'success',
            center: true,
            customClass: 'mzindex'
          })
        } else if (res.data.code == 500) {
          Message({
            message: res.data.message,
            type: 'error',
            center: true,
            customClass: 'mzindex'
          })
        }
      })
    },
    getEditRowAndColumn(columnTitle) {
      this.columnTitle = JSON.parse(JSON.stringify(columnTitle)) //避免浅拷贝，修改父组件传过来的值的时候，是父组件的也改变了
      let form = {}
      this.columnTitle
        .filter(x => {
          return x.prop !== 'parameterId'
        })
        .forEach(item => {
          form[item.prop] = ''
        })
      this.singleform = JSON.parse(JSON.stringify(form))
      this.singleVisible = true
      this.getProducer()
      this.getStandard()
      this.getImplement()
      this.getSpecification()
    },
    judge1(num) {
      this.currentNum = num
      //获取Excel导入的携带参数
      if (this.parseData[this.currentNum] != undefined) {
        this.$set(this.parseData, this.currentNum, {
          type: this.importDataType + '样品基本参数',
          measurementType: this.importDataType + this.curveAndDisplay[num][0] + this.curveAndDisplay[num][1]
        })
      } else {
        this.$set(this.parseData, this.currentNum, {
          type: this.importDataType + '样品基本参数',
          measurementType: this.importDataType + this.curveAndDisplay[num][0] + this.curveAndDisplay[num][1]
        })
        // this.parseData.push({
        //   type: this.importDataType + '样品基本参数',
        //   measurementType: this.importDataType + strArr[1] + strArr[0]
        // })
      }

      if (this.qssmdForm.specification == '' && this.importDataType == '软磁') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qssmdForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qspmdForm.specification == '' && this.importDataType == '永磁') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qspmdForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qsemdForm.specification == '' && this.importDataType == '导电') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qsemdForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qsjyForm.specification == '' && this.importDataType == '绝缘') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qsjyForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qscrForm.specification == '' && this.importDataType == '传热') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qscrForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qsjxForm.specification == '' && this.importDataType == '机械') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qsjxForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else if (this.qscdForm.specification == '' && this.importDataType == '超导') {
        Message({
          message: '样品规格不能为空！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        this.$refs['qscdForm'].validate(valid => {
          if (valid) {
          } else {
            return false
          }
        })
        this.curveAndDisplay[num] = ''
      } else {
        this.$refs.getHeaderDyna.judge1(this.curveAndDisplay[num][1], this.curveAndDisplay[num][0], this.qssmdForm.specification)
      }
    },
    getHeader(columnTitle) {
      var form = {}
      columnTitle
        // .filter(x => {
        //   return x.prop !== 'fileName'
        // })
        .forEach(item => {
          form[item.prop] = ''
        })
      if (this.headerTitle[this.currentNum] != undefined) {
        this.$set(this.headerTitle, this.currentNum, columnTitle)
        this.$set(this.curveParams, this.currentNum, form)
      } else {
        this.$set(this.headerTitle, this.currentNum, columnTitle)
        this.$set(this.curveParams, this.currentNum, form)
        // this.headerTitle.push(columnTitle)
        // this.curveParams.push(form)
      }
      console.log('this.curveParams', this.curveParams)
    },
    addCondition() {
      this.cardLength.push('')
      this.curveAndDisplay.push('')
      this.headerTitle.push({})
      this.curveParams.push({})
      this.parseData.push({})
      this.parseDataResponse.push([])
      // this.display.push('')
    },
    delCondition(index) {
      if (this.cardLength.length === 1) return
      this.cardLength.splice(index - 1, 1)
      this.curveAndDisplay.splice(index - 1, 1)
      this.headerTitle.splice(index - 1, 1)
      this.curveParams.splice(index - 1, 1)
      this.parseData.splice(index - 1, 1)
      this.parseDataResponse.splice(index - 1, 1)
      // this.display.splice(index - 1, 1)
    },

    /**************文件上传*************** */
    getParseData(response) {
      console.log('response', response)
      this.$set(this.parseDataResponse, this.uploadNum, response.result.list)
    },
    getUploadNum(num) {
      console.log('num', num)
      this.uploadNum = num
    },
    /**************文件上传*************** */

    //下载模板
    exportData(num) {
      var downFileName = ''
      var showFileName = ''
      if (this.importDataType == '软磁') {
        showFileName = this.qssmdForm.specification + this.curveAndDisplay[num][0] + this.curveAndDisplay[num][1]
        downFileName = this.qssmdForm.specification + this.curveAndDisplay[num][0] + this.curveAndDisplay[num][1]
      } else if (this.importDataType == '永磁') {
        showFileName = '永磁单个导入模板'
        downFileName = '永磁解析数据模板'
      } else if (this.importDataType == '导电') {
        showFileName = '导电单个导入模板'
        downFileName = '导电解析数据模板'
      } else if (this.importDataType == '绝缘') {
        showFileName = '绝缘单个导入模板'
        downFileName = '绝缘解析数据模板'
      } else if (this.importDataType == '传热') {
        showFileName = '传热单个导入模板'
        downFileName = '传热解析数据模板'
      } else if (this.importDataType == '机械') {
        showFileName = '机械单个导入模板'
        downFileName = '机械解析数据模板'
      } else if (this.importDataType == '超导') {
        showFileName = '超导单个导入模板'
        downFileName = '超导解析数据模板'
      }
      console.log('downFileName', downFileName)
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: `/admin/downLoadLessonFile?name=${downFileName}`,
        method: 'GET',
        responseType: 'blob'
      }).then(res => {
        const blob = new Blob([res.data])
        const url = window.URL.createObjectURL(blob)
        const link = document.createElement('a')
        link.style.display = 'none'
        link.download = `${showFileName}.xlsx`
        link.href = url
        link.click()
      })
    },
    //获得测量标准
    getStandard() {
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: `/basicsMeasurementStandard/selectMeasurement`,
        method: 'GET'
      }).then(res => {
        console.log('测量标准', res)
        this.standardOptions = []
        for (let i = 0; i < res.data.result.length; i++) {
          this.standardOptions.push({
            value: res.data.result[i].rule_number,
            label: res.data.result[i].rule_number
          })
        }
      })
    },
    //获得生产商
    getProducer() {
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: `/basicsProducerInformation/getProducerName`,
        method: 'GET'
      }).then(res => {
        console.log('生产商', res)
        this.producerOptions = []
        for (let i = 0; i < res.data.result.length; i++) {
          this.producerOptions.push({
            value: res.data.result[i].producer,
            label: res.data.result[i].producer
          })
        }
      })
    },
    //获得执行标准
    getImplement() {
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: `/basicsExecutionStandard/selectExecution`,
        method: 'POST'
      }).then(res => {
        console.log('执行标准', res)
        this.implementOptions = []
        for (let i = 0; i < res.data.result.length; i++) {
          this.implementOptions.push({
            value: res.data.result[i].rule_number,
            label: res.data.result[i].rule_number
          })
        }
      })
    },
    //获得样品规格
    getSpecification() {
      var dataNum = 0
      if (this.importDataType == '软磁') {
        dataNum = 1
      } else if (this.importDataType == '永磁') {
        dataNum = 2
      } else if (this.importDataType == '导电') {
        dataNum = 3
      } else if (this.importDataType == '绝缘') {
        dataNum = 4
      } else if (this.importDataType == '传热') {
        dataNum = 5
      } else if (this.importDataType == '机械') {
        dataNum = 6
      } else if (this.importDataType == '超导') {
        dataNum = 7
      }
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: `/basicsSpecificationName/selectSpecificationName`,
        method: 'GET',
        params: { dataNum: dataNum }
      }).then(res => {
        console.log('样品规格', res)
        this.specificationOptions = []
        for (let i = 0; i < res.data.result.length; i++) {
          this.specificationOptions.push({
            value: res.data.result[i].name,
            label: res.data.result[i].name
          })
        }
      })
    }
  }
}
</script>

<style scoped>
.el-divider {
  margin: 0;
}
</style>
